import java.util.Scanner;

/**
 * 句子逆序
 */
public class HJ13 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            String phaseStr = sc.nextLine();
            String[] words = phaseStr.split(" ");
            StringBuilder sb = new StringBuilder();
            for (int i = words.length - 1; i >= 0; i--) {
                if (i != 0) {
                    sb.append(words[i]).append(" ");
                } else {
                    sb.append(words[i]);
                }
            }
            System.out.println(sb.toString());
        }
    }
}
